/**
 * 
 */
package com.kbcss.dto;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * @author mufa
 *
 */
@Entity
//@Inheritance(strategy=InheritanceType.JOINED)
public class UserDetails {
	@Id
	private String userId;
	private String password;
	private String fName;
	private String lName;
	private String email;
	//@Temporal(TemporalType.DATE)
	private String dob;
	private String gender;
	private String phno;
	public String getPhno() {
		return phno;
	}
	public void setPhno(String phno) {
		this.phno = phno;
	}
	private String regdNo;
	
	//@OneToMany(mappedBy="user")
	//private Collection<StudyMaterial> study=new ArrayList<StudyMaterial>();
	
	//@OneToMany(mappedBy="user1")
	//private Collection<Video> video=new ArrayList<Video>();
	
	
	//@ManyToMany
	//private Collection<Discussion> discuss=new ArrayList<Discussion>();
	
	@OneToOne(cascade=CascadeType.ALL)
	private Department depart;
	
	public UserDetails(){
		
	}
	public UserDetails(String userId,String password,String fName,String lName,String email,String dob,String gender,String regdNo,Department depart,String phno){
		this.userId=userId;
		this.password=password;
		this.fName=fName;
		this.lName=lName;
		this.email=email;
		this.dob=dob;
		this.gender=gender;
		this.regdNo=regdNo;
		this.depart=depart;
		this.phno=phno;
		
	}
	
	// This mapping b/w user and comments is not sure
	//@OneToMany(mappedBy="user_cmnt")
	//private Collection<Comments> cmnt1=new ArrayList<Comments>();
	
	//public Collection<Discussion> getDiscuss() {
	//	return discuss;
	//}
	/*public void setDiscuss(Collection<Discussion> discuss) {
		this.discuss = discuss;
	}
	
	
	
	public Collection<Comments> getCmnt1() {
		return cmnt1;
	}
	public void setCmnt1(Collection<Comments> cmnt1) {
		this.cmnt1 = cmnt1;
	}
	 */
	
	
	/* public Collection<Video> getVideo() {
		return video;
	}
	public void setVideo(Collection<Video> video) {
		this.video = video;
	}
	public Collection<StudyMaterial> getStudy() {
		return study;
	}
	public void setStudy(Collection<StudyMaterial> study) {
		this.study = study;
	}
	*/
	
	public String getUserId() {
		return userId;
	}
	public Department getDepart() {
		return depart;
	}
	public void setDepart(Department depart) {
		this.depart = depart;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getfName() {
		return fName;
	}
	public void setfName(String fName) {
		this.fName = fName;
	}
	public String getlName() {
		return lName;
	}
	public void setlName(String lName) {
		this.lName = lName;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	/*
	public String getDept() {
		return dept;
	}
	public void setDept(String dept) {
		this.dept = dept;
	}
	*/
	public String getRegdNo() {
		return regdNo;
	}
	public void setRegdNo(String regdNo) {
		this.regdNo = regdNo;
	}
	public String getDob() {
		return dob;
	}
	public void setDob(String dob) {
		this.dob = dob;
	}
	
	

}
